package com.lkx.util;

import java.io.File;
import java.io.FileOutputStream;

/**
 * ClassName: UserController
 * Function:  TODO
 * Date:      2018-12-17 12:41
 * author     黄曦
 * version    V1.0
 */
public class FileUtil {
    public static void uploadFile(byte[] file, String filePath, String fileName) throws Exception{

        File targetFile = new File(filePath);
        if(!targetFile.exists()){
            targetFile.mkdirs();
        }
        FileOutputStream out = new FileOutputStream(filePath+fileName);
        out.write(file);
        out.flush();
        out.close();
    }
}
